- /* getlong.cpp by K.Tsuru */
- /****************
- long type
- *****************/
- #include "getnum.h"
- #include <string>
- using namespace std;
-
- static const char* skipch = ",. ";
- static bool skip(char c) {
- return strchr(skipch, c) != NULL;
- }
- long GetLong(){
- string buff;
- char c;
- while(1) {
- if((c = getchar())== '\n') break;
- if(skip(c)) continue;
- buff.append(1, c);
- }
- return atol(buff.c_str());
- }
-
getlong.cpp : last modifiled at 2017/02/26 15:55:36(428 bytes)
created at 2016/04/11 11:17:20
The creation time of this html file is 2017/10/07 10:54:15 (Sat Oct 07 10:54:15 2017).